import {validateNumber,validateInter,isMobile,isIdCard} from "@/util/rulesReg";
export const group =  [
    {
      label: '项目信息',
      icon: 'el-icon-edit-outline',
      column: [
        {
          label: '工号',
          prop: 'workNum',
          span: 6
        },
	    {
	      label:'工种',
	      prop:'workType',
	      type: "select",
	      span: 6,
	      dicUrl: "/api/blade-system/dict/dictionary?code=work_type",   
	      props: {
	        label: "dictValue",
	        value: "dictKey"
	      },
	      rules: [{
	        required: true,
	        message: "请选择工种",
	        trigger: "blur"
	      }] 	      
	    },
	    {
	      label:'工人类型',
	      prop:'workersType',
	      type: "select",
	      span: 6,
	      dicUrl: "/api/blade-system/dict/dictionary?code=workers_type",   
	      props: {
	        label: "dictValue",
	        value: "dictKey"
	      },
	      rules: [{
	        required: true,
	        message: "请选择工人类型",
	        trigger: "blur"
	      }] 	      
	    },
	    {
	      label:'身份',
	      prop:'operatorStatus',
	      type: "select",
	      span: 6,
	      placeholder:'请选择作业人身份',
	      dicUrl: "/api/blade-system/dict/dictionary?code=operator_status",   
	      props: {
	        label: "dictValue",
	        value: "dictKey"
	      },
	      rules: [{
	        required: true,
	        message: "请选择作业人身份",
	        trigger: "blur"
	      }] 	      
	    },
	    {
	      label:'岗位',
	      prop:'post',
	      span: 6,
	      type: "select",
	      dicUrl: "/api/squirrel-ficm/staffinfo/getPostList",   
	      props: {
	        label: "postName",
	        value: "id"
	      },
	      rules: [{
	        required: true,
	        message: "请选择岗位",
	        trigger: "blur"
	      }] 	      
	    },   
	    {
	      label:'等级职称',
	      prop:'classTitle',
	      type: "select",
	      span: 6,
	      dicUrl: "/api/blade-system/dict/dictionary?code=class_title",   
	      props: {
	        label: "dictValue",
	        value: "dictKey"
	      }	                
	    },
	    {
	      label:'所属项目',
	      prop:'deptInfoId',
	      span: 6,
	      type: "select",
	      dicUrl: "/api/squirrel-ficm/deptinfo/getProjectList",   
	      props: {
	        label: "deptName",
	        value: "id"                
	      },
	      rules: [{
	        required: true,
	        message: "请选择所属项目",
	        trigger: "blur"
	      }] 	      
	    },  	    
	    {
	      label:'科室',
	      prop:'department',
	      type: "select",
	      span: 6,
	      dicUrl: "/api/blade-system/dict/dictionary?code=department",   
	      props: {
	        label: "dictValue",
	        value: "dictKey"
	      }	                   
	    }, 	    
	    {
	      label:'证书名称',
	      prop:'certificateName',
	      span: 12                  
	    },
	    {
	      label:'身份证号',
	      prop:'idCard',
	      span: 12,
          rules: [{ validator: isIdCard, trigger: 'blur',required: true }]		      
	    },
	    {
	      label:'证书编号',
	      prop:'certificateNo',
	      span: 12                  
	    },
	    {
	      label:'过期时间',
	      type:'date',
	      format: "yyyy-MM-dd",
	      valueFormat:'yyyy-MM-dd',
	      prop:'certificateExpirationTime',
	      span: 12   
	    }	    
      ]
    },
    {
      label: '其他',
      icon: 'el-icon-edit-outline',
      column: [
	    {
	      label:'IC卡',
	      prop:'icCard',
	      span: 6
	    }, 
	    {
	      label:'分包合同',
	      type: "select",
	      prop:'isSubcontract',
	      dicData: [{label: '是',value: 1},{label: '否',value: 0}],  
	      placeholder:'请选择',
	      span: 6
	    }, 
	    {
	      label:'合同类型',
	      type: "select",
	      prop:'laborCtType',
	      span: 6,
	      dicUrl: "/api/blade-system/dict/dictionary?code=labor_ct_type",   
	      props: {
	        label: "dictValue",
	        value: "dictKey"
	      }		      
	    },  
	    {
	      label:'合同编号',
	      prop:'subcontractNub',
	      span: 6
	    }, 
	    {
	      label:'工资卡号',
	      prop:'wagesCardNum',
	      span: 8
	    }, 
	    {
	      label:'开户行',
	      prop:'wagesCardBank',
	      span: 8
	    }   
      ]
    },
    {
      label: '备注',
      icon: 'el-icon-edit-outline',
      column: [
	    {
	      label:'',
	      labelWidth:0,
	      type:'textarea',
	      prop:'remark',
	      span: 24
	    }  
      ]
    }     
]
     



export const column =  [
    {
      label:'工号',
      prop:'workNum',
      display:false
    },
    {
      label:'姓名',
      prop:'name',
      span: 6,
      rules: [{
        required: true,
        message: "请输入姓名",
        trigger: "blur"
      }]       
    },
    {
      label:'性别',
      prop:'sex',
      span: 6,
      type: "select",
      dicUrl: "/api/blade-system/dict/dictionary?code=sex",   
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      rules: [{
        required: true,
        message: "请选择性别",
        trigger: "blur"
      }]         
    },
    {
      label:'年龄',
      prop:'age',
      span: 6
    },
    {
      label:'民族',
      prop:'national',
      span: 6,
      hide:true,
      type: "select",
      dicUrl: "/api/blade-system/dict/dictionary?code=national",   
      props: {
        label: "dictValue",
        value: "dictKey"
      }	       
    }, 
    {
      label:'出生日期',
      type:'date',
      format: "yyyy-MM-dd",
      valueFormat:'yyyy-MM-dd',
      prop:'birthday',
      span: 6,
      hide:true,
      rules: [{
        required: true,
        message: "请选择出生日期",
        trigger: "blur"
      }]       
    }, 
    {
      label:'政治面貌',
      prop:'politicalLandscape',
      span: 6,
      hide:true
    },      
    {
      label:'文化程度',
      prop:'education',
      span: 6,
      hide:true,
      type: "select",
      dicUrl: "/api/blade-system/dict/dictionary?code=education",   
      props: {
        label: "dictValue",
        value: "dictKey"
      }	      
    }, 
    {
      label:'籍贯',
      prop:'nativePlace',
      span: 6,
      hide:true,
      rules: [{
        required: true,
        message: "请输入籍贯",
        trigger: "blur"
      }]       
    },         
    {
      label:'手机号码',
      prop:'contactWay',
      span: 6,
      rules: [{ validator: isMobile, trigger: 'blur',required: true }]
    },
    {
      label:'紧急联系人',
      prop:'emContact',
      span: 6,
      hide:true
    },
    {
      label:'紧急联系人电话',
      prop:'emContactNum',
      span: 6,
      labelWidth:120,
      hide:true
    },  
    {
      label:'家庭住址',
      prop:'homeAddress',
      span: 6,
      hide:true,
      rules: [{
        required: true,
        message: "请输入家庭住址",
        trigger: "blur"
      }]        
    },  
	{
	    label: '证件照',
	    prop: 'profilePic',
	    span: 6,
	    hide:true,
        formslot:true   
	},          
	{
	    label: '人脸照',
	    prop: 'facePic',
	    span: 6,
	    hide:true,
        formslot:true 
	},           
    {
      label:'所属项目',
      display:false,
      prop:'deptInfoId',
      type: "select",
      dicUrl: "/api/squirrel-ficm/deptinfo/getDeptInfoList",         
      props: {
        label: "deptName",
        value: "id"                
      }	               
    },            
    {
      label:'工种',
      prop:'workType',
      display:false,
      type: "select",
      dicUrl: "/api/blade-system/dict/dictionary?code=work_type",   
      props: {
        label: "dictValue",
        value: "dictKey"
      }	               
    },
    {
      label:'工人类型',
      prop:'workersType',
      display:false,
      type: "select",
      dicUrl: "/api/blade-system/dict/dictionary?code=workers_type",   
      props: {
        label: "dictValue",
        value: "dictKey"
      }	               
    },
    {
      label:'作业人身份',
      prop:'operatorStatus',
      display:false,
        type: "select",
        dicUrl: "/api/blade-system/dict/dictionary?code=operator_status",   
      props: {
        label: "dictValue",
        value: "dictKey"
      }	               
    },   
    {
      label:'岗位',
      prop:'post',
      display:false,
      type: "select",
      dicUrl: "/api/squirrel-ficm/staffinfo/getPostList",   
      props: {
        label: "postName",
        value: "id"
      }	              
    },   
    {
      label:'科室',
      prop:'department',
      display:false,
      type: "select",
      dicUrl: "/api/blade-system/dict/dictionary?code=department",   
      props: {
        label: "dictValue",
        value: "dictKey"
      }	                   
    }, 
    {
      label:'人员等级职称',
      display:false,
      prop:'classTitle',
      type: "select",
      dicUrl: "/api/blade-system/dict/dictionary?code=class_title",   
      props: {
        label: "dictValue",
        value: "dictKey"
      }	                
    },   
    {
      label:'证书名称',
      display:false,
      prop:'certificateName'
    }, 
    {
      label:'IC卡',
      display:false,
      prop:'icCard'
    }
    
  ]     
